package itheima.d06;

import cn.hutool.core.util.ObjectUtil;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        Pig pig1 = new Pig("小华", 5, 10);
        Pig pig2 = null;
        if(ObjectUtil.equals(pig1, pig2)){
            System.out.println("相等");
        }else {
            System.out.println("不相等");
        }
        if(ObjectUtil.isNull(pig2)){
            System.out.println("空");
        }else {
            System.out.println("非空");
        }
        if(Objects.equals(pig1, pig2)){
            System.out.println("相等");
        }else {
            System.out.println("不相等");
        }


    }
}
